package statisticalCalculator;

public class ClassicalProbability {
	private double numOfEvents;
	public double numOfPossibleOutcomes;

	public ClassicalProbability(double _numOfEvents,
			double _numOfPossibleOutcomes) {
		if (_numOfEvents < 0.0 || _numOfPossibleOutcomes <= 0.0
				|| _numOfEvents > _numOfPossibleOutcomes)
			throw new IllegalArgumentException("Invalid Arguments");

		numOfEvents = _numOfEvents;
		numOfPossibleOutcomes = _numOfPossibleOutcomes;
	}

	public double getNumOfPossibleOutcomes() {
		return numOfPossibleOutcomes;
	}

	public double getNumOfEvents() {
		return numOfEvents;
	}

	public double calculateClassicalProbabilty() {

		return numOfEvents / numOfPossibleOutcomes;
	}

	public Object calcProbabiltyOfOppositeEvent() {
		double result = 1 - calculateClassicalProbabilty();
		return result;
	}
}
